#pragma once

namespace xxhhdzl
{
	template<class T>
	class unique_ptr
	{
	public:
		unique_ptr(T* sp = nullptr)
			:ptr(sp)
		{}

		T& operator*()
		{
			return *ptr;
		}

		T* operator->()
		{
			return ptr;
		}

		unique_ptr(unique_ptr<T>& sp) = delete;

		unique_ptr<T>& operator=(unique_ptr<T>& sp) = delete;

		~unique_ptr()
		{
			delete ptr;
		}


		T* ptr;
	};
}